﻿
namespace ShevaEngine.Core.Modules.Materials
{
    /// <summary>
    /// Graphics material parameter.
    /// </summary>
    public abstract class GraphicsMaterialParameter
    {
        /// <summary>Parameter name.</summary>
        public string Name;

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name"></param>
        public GraphicsMaterialParameter() { }

        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name"></param>
        public GraphicsMaterialParameter(string name)
        {
            this.Name = name;
        }

        /// <summary>
        /// Method sets parameter.
        /// </summary>
        /// <param name="material"></param>
        public abstract void Set(GraphicsMaterial material);

        /// <summary>
        /// Is same parameter.
        /// </summary>
        /// <param name="parameter"></param>
        /// <returns></returns>
        public virtual bool IsSame(GraphicsMaterialParameter parameter)
        {
            return this.Name == parameter.Name;
        }
    }
}
